Instant messaging systems are used for enabling users in the network to chat or transfer information in the manner of words or other information in real time, and the network could be the Internet or other mobile radio networks such as GSM, CDMA, etc. Meanwhile, the instant messaging system could timely inform each of the on-line users of the on-line/off-line status of the users in his contact list.
The conventional instant messaging systems use the Client/Server structural mode, while under said peer-to-peer communication mode, real time chatting or information transferring could be directly performed between two or more mobile terminals without the involvement of a base station. As for the establishing of peer-to-peer instant messaging between two mobile terminals, the US Patent Publication No. 2003/0182428A1 (whose inventors are Jiang Li, Keman Yu, Kaibo Wang, Yong Li and Shipeng Li) has disclosed a relevant method. According to said method, firstly, the client terminal is connected to the IM server; the client terminal sends its device address and access code to the IM server; the client terminal searches for other on-line client terminals in the IM server; the client terminal receives the information of other on-line client terminals transmitted from the IM server; the client terminal analyzes the information of other client terminals to determine if they are in the same network, if so, a peer-to-peer connection will be established; the client terminal transmits information to the opponent client terminal to start the peer-to-peer communication. By means of said method, peer-to-peer instant messaging could be established between two client terminals. Since the TD-SCDMA system under the TDD (Time Division Duplex) mode could perform uplink and downlink transmission on the same carrier without using the up and down symmetrical frequency spectrum as needed by the FDD (Frequency Division Duplex) system, it becomes the CDMA system suitable for peer-to-peer communication.
The problem of said prior art is that under the premise of peer-to-peer instant messaging, the user of a mobile terminal could only perform instant messaging with other mobile terminals that could establish peer-to-peer connection with it, meanwhile, the user of a mobile terminal usually performs on-line instant messaging only with some fixed particular users (such as friends or business partners, customers, etc.) instead of with all the users in the contact list. Therefore, the user needs to keep a list of these particular users in the mobile terminal. In addition, when the user wants to establish connection with these particular users, he needs to know if these users are on-line and meet the demand for establishing peer-to-peer connection, that is, the user needs the connection status information of these particular users that is updated timely. However, during the practical application of said prior art, said list of particular users and the connection status information are usually maintained and managed by the network, and this will occupy some network resources which are more precious than the mobile terminal resources; moreover, the network load will accordingly become too heavy.
Therefore, there exists a need to provide a method and apparatus for peer-to-peer instant messaging that could enable the user to use the network resources more effectively and occupy less network resources.